package com.sy.simpleegg.room.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey
import com.sy.simpleegg.constant.PackageType
import com.sy.simpleegg.constant.PayState
import com.sy.simpleegg.constant.PayType
import com.sy.simpleegg.platform.BackstagePlatform
import com.sy.simpleegg.util.DateTimeUtil


@Entity(tableName = "tb_order")
data class OrderEntity(
    @PrimaryKey(autoGenerate = true) var id: Long = 0,
    @ColumnInfo(name = "uuid") var uuid: String = "",//乐摇摇-k
    @ColumnInfo(name = "orderNumber") var orderNumber: String = "",
    @ColumnInfo(name = "payUuid") var payUuid: String = "",//乐摇摇专用
    @ColumnInfo(name = "amount") var amount: String = "0",//订单出币数
    @ColumnInfo(name = "realAmount") var realAmount: String = "0",//实际出币数
    @ColumnInfo(name = "money") var money: String = "0",//套餐金额
    @ColumnInfo(name = "moneyList") var moneyList: String = "",//格式为："面额,数量" 如 "100,1;500,2"
    @ColumnInfo(name = "goodId") var goodId: String = "",
    @ColumnInfo(name = "goodType") var goodType: PackageType = PackageType.NORMAL,
    @ColumnInfo(name = "platform") var platform: BackstagePlatform = BackstagePlatform.DEF_MQTT,
    @ColumnInfo(name = "payType") var payType: PayType = PayType.QRCODE,
    @ColumnInfo(name = "isPay") var isPay: PayState = PayState.UNPAYED,// 0-未支付 1-支付成功 2-出货完成 3-支付超时退款
    @ColumnInfo(name = "isRepCash") var isRepCash: Int = 0,// 0-未上报纸钞数据 1-纸钞数据上报完成
    @ColumnInfo(name = "date") var date: String = DateTimeUtil.nowDate,// yyyy-MM-dd
    @ColumnInfo(name = "time") var time: String = DateTimeUtil.nowTime,// HH:mm:ss
    @ColumnInfo(name = "info") var info: String = "",//whm 钱包类型 1-游戏机钱包 2-游艺钱包
    @ColumnInfo(name = "info2") var info2: String = "",//KKB 用户ID 本地提币订单
    @ColumnInfo(name = "info3") var info3: String = "",//备用数据3
    @ColumnInfo(name = "info4") var info4: String = "",//备用数据4
    @ColumnInfo(name = "info5") var info5: String = "",//备用数据5
){
    @Ignore()
    constructor(): this(0)
}
